<template>
  <div class="mv-list">
    <div class="mv-list-item" v-for="(item, index) in list" :key="index">
      <div class="item-left">
        <img :src="item.img" :alt="item.nm" />
      </div>
      <div class="item-middle">
        <h1>{{ item.nm }}</h1>
        <h2>{{ item.cat }}</h2>
        <h2 class="desc">{{ item.desc }}</h2>
        <h3>{{ item.showInfo }}</h3>
      </div>
      <div class="list-item-right">
				<template v-if="item.showst === 3">
					<div class="score">
						<template v-if="item.sc == 0"> 暂无评分 </template>
						<template v-else> {{ item.sc }}分 </template>   
					</div>
					<div class="buy">购票</div>
				</template>
				<template v-else>
					<p class="wish">{{ item.wish }}<span>人想看</span></p>
					<div class="pre_sale">预售</div>
				</template>
			</div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["list"],
};
</script>

<style lang="less" scoped>
@import url("@/assets/border.less");
@import url("@/assets/ellipsis.less");
.mv-list {
  .mv-list-item:first-child {
    margin-top: 0.12rem;
  }
  .mv-list-item:last-child {
    margin-bottom: 1rem;
  }
  .mv-list-item {
    display: flex;
    margin: 0 0 0.12rem 0.12rem;
    padding-bottom: 0.12rem;
    position: relative;
    .border-1px(0 0 1px 0);
    .item-left {
      padding-right: 0.12rem;
      img {
        width: 0.64rem;
        height: 0.9rem;
      }
    }

    .item-middle {
      flex: 1;
      color: #666;
      h1 {
        font-size: 0.18rem;
      }

      .desc {
          .ellipsis(100%);
        
      }
      h2 {
        font-weight: 100;
      }

      h3 {
        font-weight: 100;
        color: #999;
      }
    }

    .list-item-right {
			display: flex;
			flex-direction: column;
			justify-content: flex-start;
			width: 0.65rem;
			.score {
				font-size: 0.2rem;
				color: #f4b73f;
				font-weight: bold;
			}
			.wish {
				font-size: 0.2rem;
				color: #f4b73f;
				font-weight: bold;
				span {
					font-size: 0.16rem;
				}
				position: absolute;
				right: 0.2rem;
			}
			.pre_sale {
				width: 0.45rem;
				height: 0.27rem;
				background-color: #679dda;
				border-radius: 0.04rem;
				color: white;
				line-height: 0.27rem;
				text-align: center;
				margin-top: 0.4rem;
			}

			.buy {
				width: 0.45rem;
				height: 0.27rem;
				background-color: #be3634;
				border-radius: 0.04rem;
				color: white;
				line-height: 0.27rem;
				text-align: center;
				margin-top: 0.1rem;
			}
		}
  }
}
</style>